import axios from 'axios';

// 创建axios实例
const instance = axios.create({
  baseURL: 'http://project.x-zd.net:3001/apis',
  timeout: 3000,
});

// 设置响应拦截器
instance.interceptors.response.use(
  res => {
    return res.data;
  },
  error => {
    return Promise.reject(error);
  }
);

//导出axios实例
export default instance;
